package clases;

public class Pair {
    Integer left;
    Integer right;
 
    public Integer getSec()
    {
         return right;
    }
 
    public Integer getPrim()
    {
        return left;
    }
 
    public Pair( Integer left, Integer right) {
        this.left = left;
        this.right = right;
    }
 
    public boolean equals(Pair tup) {
    	if(this.left.equals(tup.left)) {
    		if(this.right.equals(tup.right)) {
    			return true;
    		} 
    		
    	}
    	if(this.left.equals(tup.right)) {
    		if(this.right.equals(tup.left)) {
    			return true;
    		}
		}
    	return false;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((left == null) ? 0 : left.hashCode());
		result = prime * result + ((right == null) ? 0 : right.hashCode());
		return result;
	}

	   
    
}
